<?php


namespace App\Transformers;


use App\Models\Image;
use League\Fractal\TransformerAbstract;

class ImageTransformer extends TransformerAbstract
{
    public function transform(Image $image)
    {
        return [
            'id'=>$image->id,
            'type'=>$image->type,
            'user_id'=>$image->user_id,
            'path'=>$image->path,
            'created_at'=>(string)$image->created_at,
            'updated_at'=>(string)$image->updated_at,
        ];
    }
}
